package com.yiyuan.weixin.weixinInservice.Iml;

import com.yiyuan.weixin.model.ReceiveXmlEntity;
import com.yiyuan.weixin.weixinInservice.service.WXResponseService;

import javax.servlet.http.HttpServletResponse;
import java.io.OutputStream;

/**
 * Created by admin on 2017/3/28.
 */
public abstract class AbsWXResponse implements WXResponseService {

    public void responseMessage(HttpServletResponse resp,String respMessage){
        try {
            resp.setCharacterEncoding("UTF-8");
            OutputStream os = resp.getOutputStream();
            os.write(respMessage.getBytes("UTF-8"));
            os.flush();
            os.close();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

}
